package cn.bytepulse.web.video.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.util.Date;

/**
 * 视频信息
 *
 * @author jiejiebiezheyang
 * @since 2025-03-21 11:00
 */
@Data
@TableName(value = "videos")
public class Videos {
    /**
     * 视频Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    @TableField(value = "title")
    @NotBlank(message = "标题不能为空")
    private String title;

    /**
     * 描述
     */
    @TableField(value = "`desc`")
    private String desc;

    /**
     * 演员
     */
    @TableField(value = "performers")
    private String performers;

    /**
     * 总集数
     */
    @TableField(value = "total_part")
    private Integer totalPart;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 封面地址
     */
    @TableField(exist = false)
    private String cover;
}